<template>
	<view class="container">
			<uni-section title="编号" sub-title="" type="square">
				{{data.id}}
			</uni-section>
			<uni-section title="同学姓名" sub-title="" type="square">
				{{data.name}}
			</uni-section>
			<uni-section title="学院" sub-title="" type="square">
				{{data.department}}
			</uni-section>
			<uni-section title="专业" sub-title="" type="square">
				{{data.major}}
			</uni-section>
			<uni-section title="电话" sub-title="" type="square">
				{{data.telephone}}
			</uni-section>
		</view>
</template>

<script>
	export default {
			data() {
				return {
					data:  {
					      "id": 1,
					      "name": "张三",
					      "password": "123",
					      "email": "zs@163.com",
					      "telephone": "15116785432",
					      "department": "信息工程学院",
					      "major": "移动应用开发"
					    }
	             }
				},
				methods: {
	
				},
				onShow() {
				},
			onLoad(e) {
					let id = e.id
					uni.request({
						url: 'http://localhost:8090/freshmenapp/classmate/findone',
						method: 'POST',
						data: {
							id: id
						},
						success: res => {
							this.data = res.data.data
						},
						fail: () => {},
						complete: () => {}
					});
					
				}
			}
</script>

<style>
	.container {
			padding: 10px;
			font-size: 14px;
			line-height: 24px;
		}
</style>